import java.util.Scanner;

public class Solution {
    public boolean isPerfectSquare(int num){
//本题不允许使用库函数sqrt
//暴力求解，最多需要遍历√n+1个整数，时间复杂度为O(n)，不需要创建额外的内存，空间复杂度为O(1)

        int left = 0;
        int right = num;
        while(left <= right){
            int mid = (right - left) / 2 + left;//利用二分查找
            long square = (long) mid*mid;//一个数一定比它的完全平方数小
//如果中间数的平方小于num，则left+1；如果中间数的平方大于num，则right-1
//等于时，直接返回真
            if(square < num){
                left = mid + 1;
            } else if (square > num) {
                right = mid - 1;
            }else {
                return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            int num = in.nextInt();
            Solution solution = new Solution();
            boolean result = solution.isPerfectSquare(num);
            System.out.println(result);
        }
    }
}